Skip to content

feat(plugin-grid,core): the Import Wizard names the column a lookup cell was scoped by; a scope no read could filter by says so - #37706

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-zt8cu4
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-zt8cu4

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #36794 (PR-2 of 2; PR-1 #37567 landed the spec reason and the importer)

Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 导入向导在预检和完成页上,对“查找值属于另一个父记录”的情况显示专门的提示,例如 "Design review" was found, but not under Project "Gemini"。提示会用标签说出限定它的列和本行填的值,11 种界面语言都已翻译。
  • 补上契约审核提出的一个漏洞:如果 dependsOn 指向一个引擎无法筛选的字段(比如公式),限定查询一次都没跑成。这种情况以前会被误报成“在别的父记录下”,现在照旧报“找不到记录”,提示语改为说明无法在这个范围内查找,需要给 dependsOn 换一列。
  • 只影响导入失败行的显示文字和一种配置错误时的错误码,成功导入不受影响,没有新增可写的元数据键。整张 PR 可以直接撤回。
  • 无。

What changes

  • Import Wizard (ui/packages/plugin-grid/src/ImportWizard.tsx): formatDryRunError gains case 'reference_out_of_scope', rendered from the cell error's structured scope. Each entry is named by the importing object's field label (its api-name when it has none) with the cell the row gave it, joined in the order the server sent them by the pack's own separator (grid.import.scopeSeparator: 、 in ja and zh, ، in ar; review N3). The Wizard keys on the code and scope only and never parses the server sentence; a cell error with no scope falls through to the server's own sentence (already in the caller's locale), the same path an unknown code takes. scope is carried onto ImportResult.errors by both the synchronous import mapping and jobResultToImportResult, so the completion screen renders the same text as the dry-run panel. New keys grid.import.referenceOutOfScope, grid.import.scopeEntry and grid.import.scopeSeparator are in the Wizard's default dictionary and in all 11 locales under ui/packages/i18n/src/locales/.
  • Review nit 2, a scope no read could filter by (packages/core/src/utils/import-runner.ts, import-coerce.ts): the resolver records whether any scoped candidate read ran to an answer, and whether a read was refused by the engine's filter seam for the scope: isScopeFilterRefusal, the declared code: 'INVALID_FIELD' naming a scope field in fields, read off the refusal like isScopeFieldDenial, never its message. Only when no read answered and such a refusal was seen (the dependsOn param names a target field the engine cannot filter by, such as a formula) does it return RefMatch.scopeUnqueryable. A lookup whose reads are all refused for any other reason (no read grant on the target, a driver fault) keeps the plain miss and the plain sentence (contract review S1, 7204641031). That cell keeps reference_not_found, with no unscoped probe and no scope, and gets its own catalog sentence import_reference_scope_unqueryable, whose remedy names the target field the dependsOn entry filters by ("point that dependsOn entry at a stored field", review N1) (packages/spec/src/system/validation-message.ts, all four platform locales). Chosen: the runtime answer, no lint. A lint refusing such a dependsOn would refuse metadata that publishes today, which is a narrowing that needs its own card. Before this PR that cell answered reference_out_of_scope once the unscoped probe found the value, which claimed a fact the import never checked.
  • Review nit 1: ImportRowResultSchema.errors describe (packages/spec/src/api/export.zod.ts) and the runner's ImportRowResult.errors jsdoc now say a reference_out_of_scope element carries scope. Regenerated content/docs/references/api/export.mdx.
  • Review nit 4: content/docs/api/error-catalog.mdx now says scope names the row's own scoping columns and the cells the row gave them, not the parent's columns.
  • content/docs/data-modeling/import-mappings.mdx, scoped-lookup section: a dependsOn param naming a formula cannot scope the lookup, and the cell answers reference_not_found with the could-not-look-up sentence; any other refusal keeps the plain sentence.
  • Changeset: @objectstack/spec, @objectstack/core, @object-ui/plugin-grid and @object-ui/i18n patch. Metadata-protocol: none: no key enters packages/spec/authorable-surface/*.json, because check:generated moved only the references page. The new catalog key is message vocabulary, the same class as PR-1's import_reference_out_of_scope, which its claim also read as none. Clause-②: yes (widening): a new catalog key a deployment can override, and a wire answer that only becomes more precise for a case no released version answered reference_out_of_scope for.

Tests

  • Review nit 3, a real engine and the real field guard (packages/qa/dogfood/test/import-reference-out-of-scope.dogfood.test.ts): a booted stack with the real SecurityPlugin, ObjectQL, SQL driver and the REST import door, plus a fixture member whose permission set hides oos_task.project. The guard is shown live first: the member's filter on that field gets 403, the admin's gets 200. The pins:
    • Admin, a task of another project: reference_out_of_scope with scope: [{ field: 'project', value: 'Gemini' }]. The in-scope row resolves and stores the id. A value nobody has: reference_not_found with no scope.
    • Member, the same rows: reference_not_found, plain sentence, no scope, including the row whose task really is under its own project.
    • A dependsOn whose param is a formula: reference_not_found with the import_reference_scope_unqueryable sentence.
    • None of these reads the guard's reason across a package as a string. Each answer comes from the real seam.
  • Ablation (dogfood): with the isScopeFieldDenial branch disabled, the member pin goes red. With the scopeUnqueryable assignment disabled, the formula pin goes red (2 failed / 2 passed). Restored: 4 passed.
  • packages/core/src/utils/import-runner-reference-master-scope.test.ts: a new pin in which every scoped read is refused INVALID_FIELD naming the scope field. It answers reference_not_found with the new sentence, no scope, and no unscoped probe. Two pins for S1: every read refused PERMISSION_DENIED naming no field, and every read refused INVALID_FIELD naming a field outside the scope; both answer the plain sentence.
  • packages/spec/src/system/validation-message.test.ts: every locale of import_reference_scope_unqueryable interpolates {{value}} and {{scope}} and names dependsOn; the English render.
  • ui/packages/plugin-grid/src/importDryRun.test.ts: the new case names the scope column by its label and the row's cell; a multi-column scope names every column (one without a label by api-name), joined by the pack's separator; it is never rendered as "no matching record"; with no scope, the server sentence is shown minus the api-name prefix. importAsyncPath.test.ts: jobResultToImportResult carries scope onto the error.
Local readings (tree 8b99fd1, on main fbcfdfb; round 2 head f9dcf30: core master-scope 19 passed, spec validation-message 45 passed, dogfood out-of-scope 4 passed, ui i18n + plugin-grid 428 files / 4822 passed, plugin-grid type-check and core tsc green)

Acceptance notes

  • The unfilterable-scope cell keeps the reference_not_found code, so the Wizard shows its generic "No matching record" text there. The precise sentence reaches API callers in the cell error's message. That case is an authoring mistake that a Wizard user cannot fix, and a code of its own would be a new FieldErrorCode member, which needs its own contract review. Left as it is.

Verification

Read first: formatDryRunError in ImportWizard.tsx (case 'reference_out_of_scope'), the resolver's lookup in import-runner.ts (asked, scopeUnqueryable), and referenceNotFound in import-coerce.ts.

Two-minute check: pnpm --dir ui exec vitest run packages/plugin-grid/src/importDryRun.test.ts -t "reference_out_of_scope" runs 4 tests, all green.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgWgMUXf5juNBhN6rLX

…ell was scoped by; a scope no read could filter by says so

The Import Wizard renders reference_out_of_scope from the cell error's
structured scope (grid.import.referenceOutOfScope, grid.import.scopeEntry,
11 locales), on the dry-run panel and the completion screen.

A scoped lookup none of whose reads ran (a dependsOn param naming a field
the engine cannot filter by, such as a formula) keeps reference_not_found
with its own catalog sentence import_reference_scope_unqueryable, never
reference_out_of_scope. Review nits on #37567: errors describe and jsdoc
name scope; the error catalog says scope is the row's own columns; a
dogfood pin drives the real field guard and a formula scope.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgWgMUXf5juNBhN6rLX
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation protocol:system tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/core, @objectstack/spec, touching 17 documentable anchor(s).

27 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json e491fce2c70a67a92f2c40cb38e2f8b23af40ce4.

⛔ 13 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 184 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json e491fce2c70a67a92f2c40cb38e2f8b23af40ce4 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 385deb333d6df6ff23a733d70f0cf41f8691e6e2 — the merge of head f9dcf30afd057a20a385c8c093262761fc9d3f3b into base e491fce2c70a67a92f2c40cb38e2f8b23af40ce4, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 385deb333d6df6ff23a733d70f0cf41f8691e6e2 && git checkout 385deb333d6df6ff23a733d70f0cf41f8691e6e2
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e491fce2c70a67a92f2c40cb38e2f8b23af40ce4 f9dcf30afd057a20a385c8c093262761fc9d3f3b && git checkout -B drift-repro e491fce2c70a67a92f2c40cb38e2f8b23af40ce4 && git merge --no-ff f9dcf30afd057a20a385c8c093262761fc9d3f3b

node scripts/docs-audit/affected-docs.mjs --json e491fce2c70a67a92f2c40cb38e2f8b23af40ce4

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs e491fce2c70a67a92f2c40cb38e2f8b23af40ce4 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 6760d275246a4239d5cff46b98a79ff9c0df53e1
Local-runs: none
Scope: packages/spec/src/api/export.zod.ts, packages/spec/src/system/validation-message.ts + packages/core/src/utils/import-coerce.ts, packages/core/src/utils/import-runner.ts, ui/packages/plugin-grid/src/ImportWizard.tsx

① Derived judgments

Read: card #36794 (body, triage 7118224568, claim 7192981274, amendment 7194794693), the PR-1 record 7195843916 on #37567 with its four nits, this PR's body and 27-file list, the net diff against main (merge-base fbcfdfbb), and the check-runs on the head. 74 runs: 63 success, 11 skipped, none red, none pending. The two that were still running, PR-body guards and Check Changeset, were re-read and both ended in success. The PR author is objectstack-fleet[bot] and the PR is a draft. No record and no claim line named this head before this one.

  • packages/spec/src/api/export.zod.ts: one describe sentence on ImportRowResultSchema.errors. No accept-set moves. The regenerated references page changes at the three positions that embed the row result, and no authorable-surface file is in the diff. Right.
  • BUILTIN_VALIDATION_MESSAGES gains import_reference_scope_unqueryable in en, zh-CN, ja-JP and es-ES. Additive. Right.
  • @objectstack/core exported RefMatch gains one optional member, scopeUnqueryable. Additive. Right.
  • @object-ui/plugin-grid ImportResult.errors elements gain an optional scope, and the Wizard's default dictionary and all eleven UI locale packs gain grid.import.referenceOutOfScope and grid.import.scopeEntry. Additive. Right.
  • Behaviour: a scoped lookup none of whose candidate reads returned, and that the field-predicate guard did not refuse, now answers reference_not_found with the new sentence, runs no unscoped probe and carries no scope. Against main this moves the formula case from reference_out_of_scope back to reference_not_found. PR-1's changeset is still pending under .changeset/, so no released version answered the other code for it. Right for the declared case. The predicate is wider than the declared case: S1 in ④.
  • No removal, no tombstone, no rename, no requirement tightened. Nothing implies an ADR-0087 registry entry.
  • The new dogfood file has no CI verdict on this head yet. Dogfood Regression Gate is green at PR speed and its shards are skipped there, so the four pins first run in the merge group. Until then they rest on the dev's local reading.

② Semver level

  • The changeset bumps @objectstack/spec, @objectstack/core, @object-ui/plugin-grid and @object-ui/i18n patch. Metadata-protocol: none is right for this diff: the spec half is a describe sentence and a message-catalog key, and neither is something a metadata author writes. none takes patch. Check Changeset is green on both of its runs.
  • The claim amendment 7194794693 reads added. That line is about PR-1's scope key, which landed in feat(spec,core): a scoped import lookup miss whose value exists under another parent answers reference_out_of_scope #37567. This PR's file list moves no authorable-surface file.
  • Clause-②: yes (widening) and Metadata-protocol: none are line-initial in the PR body and in the changeset body. The arm is right: the public surface gains a catalog key a deployment can override and optional type members, and nothing leaves it.
  • The changeset body agrees with the tree sentence by sentence, with one exception. It says the new answer is given when "none of its scoped reads could run" and names the formula param as the reason. The code tests only the first half. That is S1.

③ Boundary flags

Dev flag 1: a formula-scoped column still shows the Wizard's generic "No matching record". Acceptable in this PR, and a second code is not owed here. The card's acceptance keeps the plain text for reference_not_found, and ruling A adds exactly one code. A second FieldErrorCode member is outside that ruling. The durable remedy is at the producer: lint refuses a dependsOn param that names a field the engine cannot filter by, judged with the spec predicate the resolver already uses. That is a narrowing and needs its own card, as the PR body says. This PR closes #36794 and names no such card, so the seat files or names one at ACCEPT (nit N2).

Dev flag 2: the two i18n census assertions. Honest updates. Neither gate is loosened.

  • de-quote-pairing-3876: both pins stay exact equalities and move 133 to 135. The German pack gains exactly two correctly paired spans, one in each new key.
  • untranslated-identity-4376: grid.import.scopeEntry is two placeholders and a pair of quotes with no word to translate, the same class as the grid.summary.pattern entry already listed. It is byte-identical to en in zh-Hans, zh-Hant and ko, so the file's own dead-entry assertion holds the entry live, and the reason text names those three packs correctly.

PR-1's nits. Nit 1 (the errors describe and the runner jsdoc) is closed in this diff. Nit 3 (a real engine and the real field guard) is answered by the dogfood file, subject to the CI note in ①. Nit 4 is a prose-face fix for the lane seat. Nit 2 is answered at runtime instead of by lint, with the reason given. The runtime answer is the right shape; its predicate is S1.

Row access. The diff changes no access behaviour. Every lookup read, and the unscoped probe from #36735, still runs as the importing caller, and the new path removes a read. The new sentence is composed from the row's own cells and field labels only. Whether the new answer is given depends on whether the reads were refused, never on what any record holds, so it tells the importer nothing about records outside the caller's own read.

SQL push-down. No finding. The diff adds no read, materialises no id list and joins nothing in the application.

Fixes #36794 is right: this is PR-2 of 2, and the card's Wizard acceptance is met by formatDryRunError's new case and its four unit pins.

④ Design judgment

packages/spec/src/api/export.zod.ts holds. The sentence agrees with ValidateDataIssueSchema.scope and with emission: referenceNotFound sets scope on the out-of-scope branch alone, from a non-empty list, and the runner copies it only when set. Its first consumer is the Wizard's firstCellScope, which reads element 0, the element the row's field, code and error name.

packages/spec/src/system/validation-message.ts holds for the case it names and not for every case the code sends it to. The key is in all four locales with the label, value and scope placeholders, and the jsdoc's composition claim agrees with referenceNotFound. The jsdoc and the sentence both state a cause: every read failed because the scope names a target field the engine cannot filter by. The implementing code does not establish that cause.

S1 (should-fix) — the new sentence states a cause the resolver never checked.

  • import-runner.ts sets scopeUnqueryable on scope && !asked && !match.scopeDenied. That is true whenever every scoped candidate read threw, whatever the reason.
  • One reachable case, by reading: an importing caller with no read grant on the lookup's target object. The security middleware answers every find on it with a permission denial whose details carry no field_predicate_denied reason, so isScopeFieldDenial is false and asked stays false. A read that fails on every candidate for any other reason takes the same path.
  • That cell then tells the importer that the lookup's target cannot be filtered by that column and that the field's dependsOn needs another one. The column is filterable. The scope can also be the inferred master, where the field declares no dependsOn at all.
  • On main the same cell answers the plain "no record matches" sentence, so this diff changes it. The code stays reference_not_found and nothing is disclosed. The defect is a false, misdirecting reason, the class of claim this PR removes for the formula case.
  • Fix, either one. Match the refusal positively, as isScopeFieldDenial does: both filter doors declare code: 'INVALID_FIELD' and fields on the refusal, so set the flag only when a refused read names a scope key there, and let every other all-failed lookup keep the plain sentence. Or keep the !asked test and remove the cause and the remedy from the sentence in all four locales, the jsdoc, the RefMatch comment and the docs line. The first keeps the useful remedy.
  • A pin belongs with it: a scoped lookup whose every read is refused for another reason answers the plain sentence.

packages/core/src/utils/import-coerce.ts agrees with the contract. The scopeUnqueryable branch returns before the probe, keeps reference_not_found, selects the new key and sets no scope. The single-value and multi-value branches both hand in the scoped match. The RefMatch.scopeUnqueryable comment infers the cause from the failure; that is S1.

packages/core/src/utils/import-runner.ts agrees except for S1. asked is set only after a read returns, the flag is never set on an unscoped lookup or over a field-guard refusal, and the verdict is not cached, like every other miss.

ui/packages/plugin-grid/src/ImportWizard.tsx agrees. The new case keys on the code and the structured scope and never reads the server sentence. With no scope it falls through to the server's sentence, the path an unknown code takes. The dry run, the synchronous import mapping, the job mapping and the completion screen all carry scope, so the two screens read alike.

Nits, each an accepted deviation or a follow-up. The dev may fold N1 into the S1 commit, since that commit moves the head anyway.

  • N1: the sentence's remedy is ambiguous. "That column" reads as the row's column the scope placeholder names by label, and "needs another one" reads as another row column. What has to change is the target field param names, as the docs line says. With a two-column scope "that column" names neither.
  • N2: no card is named for the lint half of PR-1's nit 2 (dev flag 1 above). Follow-up card at ACCEPT.
  • N3: the Wizard joins several scope entries with a hard-coded ASCII comma, inside text that is otherwise localized in eleven packs. The server's qualifier does the same on purpose; the Wizard's own text need not.

No must-fix. S1 is open on this head, so this record does not clear the head for the queue until a delta record closes it.

Implemented-by: claude/project-thread-zt8cu4
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

…or the filter seam's refusal of the scope

A scoped lookup answers import_reference_scope_unqueryable only when a read
was refused INVALID_FIELD naming a scope field, read off the refusal's
declared code and fields. Every other all-refused lookup (no read on the
target, a driver fault) keeps the plain sentence. The sentence's remedy names
the target field the dependsOn entry filters by. The Import Wizard joins
several scope entries with the pack's own separator (grid.import.scopeSeparator).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgWgMUXf5juNBhN6rLX
@github-actions github-actions Bot added size/l and removed size/m labels Nov 26, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: f9dcf30afd057a20a385c8c093262761fc9d3f3b
Local-runs: none
Scope: packages/spec/src/api/export.zod.ts, packages/spec/src/system/validation-message.ts + packages/core/src/utils/import-coerce.ts, packages/core/src/utils/import-runner.ts, ui/packages/plugin-grid/src/ImportWizard.tsx

Delta review, round 2, from 6760d275246a4239d5cff46b98a79ff9c0df53e1 (record 7204641031: PASS, should-fix S1, nits N1 to N3) to this head.

① Derived judgments

Read: card #36794 with its three comments, the PR body and 27-file list, record 7204641031, the whole diff from the earlier head to this one (one commit, 21 files), the net diff against main (merge-base fbcfdfbb), and the check-runs on this head. 74 runs: 63 success, 11 skipped, none red, none pending. The PR author is objectstack-fleet[bot] and the PR is a draft. No record and no claim line named this head before this one.

  • packages/spec/src/system/validation-message.ts: the import_reference_scope_unqueryable sentence is reworded in en, zh-CN, ja-JP and es-ES, and its jsdoc with it. This PR adds the key, so no released version carried the earlier wording. No key is added or removed by the delta. Right.
  • packages/spec/src/api/export.zod.ts: not touched by the delta. Round 1's judgment stands.
  • RefMatch.scopeUnqueryable keeps its shape and takes a narrower meaning: it is set only when no candidate read answered and a read was refused with INVALID_FIELD naming a scope key. Against main the member is still additive. Right.
  • grid.import.scopeSeparator is a new key in the Wizard's default dictionary and in all eleven UI packs. Additive. Right.
  • Behaviour: a scoped lookup whose reads are all refused for any reason other than the two the resolver now reads off the refusal goes back to what main does with it. It is a plain miss, and a plain scoped miss is asked once more without the scope. Right; N4 in ④ is about how the prose words that.
  • No removal, no tombstone, no rename, no requirement tightened. No authorable-surface file is in the net diff.
  • The dogfood file still has no CI answer on this head. Its shards are skipped at PR speed and first run in the merge group. The formula pin now passes only if the real doors declare the code and the field list; by reading they do (④), and the dev reports four passed locally on this head.

② Semver level

  • The changeset still bumps @objectstack/spec, @objectstack/core, @object-ui/plugin-grid and @object-ui/i18n patch, and Check Changeset is green on both of its runs. Clause-②: yes (widening) and Metadata-protocol: none are still line-initial in the PR body and in the changeset, and still the right values: the delta adds one UI text key and rewords one catalog sentence.
  • The rewritten changeset paragraph agrees with the tree: the new sentence is given for an INVALID_FIELD refusal naming the scope field, and a lookup refused for lack of read access keeps the plain sentence.
  • One loose phrase, on the prose face, for the lane seat: it says every scoped read is refused naming that field. A read whose candidate field the target does not declare is refused naming the candidate instead, because the unknown-name answer comes first. The read by id always names the scope field, which is all the resolver needs.

③ Boundary flags

  • The seat's ruling on S1 (match the refusal positively, keep the remedy text) is implemented as ruled.
  • N1 and N3 ride with the S1 commit, as the seat had them. Both are judged in ④.
  • N2 is unchanged by this head: the lint card for a dependsOn param the engine cannot filter by is still owed at ACCEPT. The PR body names none yet.
  • Dev flags from round 1 stand as answered there. The census pins did not move in the delta, and need not: grid.import.scopeSeparator holds no run of Latin letters, so the identity census does not read it, and it holds no quote, so the German pairing count is unchanged.
  • Row access. The delta adds no read. The new test reads the refusal's code and fields and nothing else. Whether the new sentence is given depends on how the target field is declared, never on what a record holds, and the sentence is still composed from the row's own cells and labels.
  • SQL push-down. No finding. The delta materialises no id list and joins nothing in the application.

④ Design judgment

packages/spec/src/system/validation-message.ts holds. The sentence now states a cause the selecting code establishes, and its remedy names the right thing.

  • S1: closed. isScopeFilterRefusal reads the refusal's declared code and its fields (or details.fields), never its text. The resolver sets scopeUnqueryable only when no read answered, such a refusal was seen, and the field guard did not refuse.
    • The match is live. findData runs the ingress filter gate before the engine, and that gate sets code: 'INVALID_FIELD' and fields on all three of its answers: a name the object does not declare, a dotted path, and a virtual field. The engine's own filter seam sets the same pair on its two. fields holds the where keys as written, and the scope's keys are where keys. The import doors hand the runner the protocol in-process, so the refusal arrives with its properties.
    • At least one read names the scope field. id is always a candidate and always declared, so the read by id is refused for the scope field itself.
    • Other doors on the same read declare the same pair for a filter field: the internal-field guard, the credential guard, and the stored-metadata body and hash columns. Each refuses every filter over the named field, whoever asks, so "cannot be filtered on" is true there too. A param that names no field of the target gets the sentence as well, and it is true of that.
    • What does not match: a comparand the field's type cannot take answers INVALID_FILTER, a driver fault answers its own code, and a missing grant answers a permission denial. None of them is taken for the scope.
    • A mixed answer cannot mislead. The filter doors judge the declaration alone and run before the permission middleware, so with an unfilterable scope every read is refused there, and with a filterable one none is. If the mix did occur, the flag still needs a refusal that names a scope key, which is a fact about the field for every caller. A field-guard refusal ends the loop and wins. One answered read keeps the normal path.
    • Both pins asked for are in: every read refused PERMISSION_DENIED naming no field, and every read refused INVALID_FIELD naming a field outside the scope. Each answers the plain sentence. The fake refusals carry the same properties the real doors set.
  • N1: closed. All four locales now name the target field the dependsOn entry filters by and tell the author to point that entry at a stored field. The jsdoc says the remedy never names a row column. Residue, accepted: with two dependsOn entries the sentence does not say which one, and "stored" is loose for a field that is stored but withheld. The action it asks for is right in both cases.
  • N4, new, a nit. The jsdoc here says any other refusal "keeps the plain sentence", and the changeset and the docs line say the same. The tree keeps a plain miss, as the RefMatch comment says exactly, and referenceNotFound then asks without the scope as it does for any scoped miss. A refusal that has nothing to do with the scope refuses that second read too, so the plain sentence follows, as pinned. A refusal caused by the scope cell's value (INVALID_FILTER) leaves the second read free to answer, and that cell answers reference_out_of_scope. This is what main does today, and the claim is not false there: a value the field's type cannot take matches no record. It has no effect on correctness. Accepted deviation; the N2 card can carry one line on it, to skip the second read whenever no scoped read answered.

packages/spec/src/api/export.zod.ts is unchanged since round 1 and holds as judged there.

packages/core/src/utils/import-runner.ts agrees with the contract. The flag is read off declared properties, set only on a scoped lookup, never over a field-guard refusal, and never cached.

packages/core/src/utils/import-coerce.ts agrees. Only comments moved, and they now say what the runner does.

ui/packages/plugin-grid/src/ImportWizard.tsx agrees.

  • N3: closed. The entries are joined by t('grid.import.scopeSeparator'). The values are right for each pack and match the separators those packs already carry (partSeparator, nameSeparator): 、 in ja, zh-Hans and zh-Hant, ، in ar, , in the other seven. The Wizard falls back per key, so a host dictionary without the key gets the default. The pin uses a separator that is not a comma.

N2 stays a follow-up card at ACCEPT. N4 is an accepted deviation.

No must-fix. No should-fix.

Implemented-by: claude/project-thread-zt8cu4
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head f9dcf30 · card #36794 · area s2-data · 2026-11-26T23:22Z

L1 checklist

  • Shape and relation. l1-face.mjs --pr 37706 read 13 items and flagged none; 74 check-runs on this head, 63 success, 11 skipped, none red or pending. The dogfood shards skip at PR speed, so the real-engine formula pin first runs in the merge group; the dev reports it green locally and the reviewer confirmed by reading that the doors it relies on declare the matched code and fields.
  • Fixes #36794 is right (PR-2; PR-1 feat(spec,core): a scoped import lookup miss whose value exists under another parent answers reference_out_of_scope #37567 merged). An import value outside the row's lookup scope now reads reference_out_of_scope in the wizard in 11 locales; a scope the target cannot be filtered on answers its own sentence only when a filter door refuses naming the scope field (positive match on the declared INVALID_FIELD and fields), and every other refusal keeps the plain "no matching record". PR-1's nits 1, 3 and 4 are closed; nit 2 is answered at run time here, its lint half goes to the follow-up card.
  • Contract review. Record 7204641031 PASS with S1 open → delta 7205472092 on this head: PASS, S1, N1, N3 closed, no must-fix, no should-fix. N2 (lint on dependsOn.param) and N4 (skip the unscoped probe when no scoped read answered) go to follow-up card review follow-ups of PR #37706: lint a lookup dependsOn param that names a field its target cannot filter on; skip the unscoped probe when no scoped read answered #37717. Adopted. No row-access change: every read still runs as the importing caller.
  • Declarations. Clause-②: yes (widening) (a catalog key and optional type members); Metadata-protocol: none (export.zod.ts changes one describe sentence; no authorable-surface file); patch on four packages. True.
  • Governance. check-governed-merges.mjs: not governed. Tier S.

Tier: S. Landing: ready + auto-merge by this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 23:23
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit ea1b70a Nov 26, 2026
75 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-zt8cu4 branch November 26, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:system size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import: a scoped lookup miss whose value exists under another parent gets its own reason reference_out_of_scope, and the Import Wizard dry run says so

2 participants